﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.SLUnity;

using SLUnityDemo.Models;
namespace SLUnityDemo
{
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();

        }

        private void testButton_Click(object sender, RoutedEventArgs e)
        {
            //http://weblogs.asp.net/podwysocki/archive/2008/02/26/ioc-and-the-unity-application-block-once-again.aspx
            IUnityContainer myContainer = new UnityContainer();
            myContainer.RegisterType<ILogger , ConsoleLogger  >();
            ILogger myServiceInstance = myContainer.Resolve<ILogger>();

            Console.Write(myServiceInstance.ToString());

        }
    }
}
